Value Setting Function
The function that you call to send the interpolated value to the receiving track is defined as a universal procedure in systems that support the Code Fragment Manager (CFM) or defined as a data procedure for non-CFM systems:
typedef UniversalProcPtr TweenerDataUPP; /* CFM */
typedef TweenerDataProcPtr TweenerDataUPP; /* non-CFM */
The TweenerDataUPP function pointer specifies the function the tween component calls with the value generated by the tween operation. A tween component calls this function from its implementation of the TweenerDoTween function.
typedef pascal ComponentResult (*TweenerDataProcPtr)(
TweenRecord *tr,
void *tweenData,
long tweenDataSize,
long dataDescriptionSeed,
Handle dataDescription,
ICMCompletionProcRecordPtr asyncCompletionProc,
ProcPtr transferProc,
void *refCon);
-
tr
-
Contains a pointer to the tween record for the tween operation.
-
tweenData
-
Contains a pointer to the generated tween value.
-
tweenDataSize
-
Specifies the size, in bytes, of the tween value.
-
dataDescriptionSeed
-
Specifies the starting value for the calculation. Every time the content of the
dataDescription
handle changes, this value should be incremented.
-
dataDescription
-
Specifies a handle containing a description of the tween value passed. For basic types such as integers, the calling tween component should set this parameter to
nil
. For more complex types such as compressed image data, the calling tween component should set this handle to contain a description of the tween value, such as an image description.
-
asyncCompletionProc
-
Contains a pointer to a completion procedure for asynchronous operations. The calling tween component should set the value of this parameter to
nil
.
-
transferProc
-
Contains a pointer to a procedure to transfer the data. The calling tween component should set the value of this parameter to
nil
.
-
refCon
-
Contains a pointer to a reference constant. The calling tween component should set the value of this parameter to
nil
.
DISCUSSION
You call this function by invoking the function specified in the tween record's
dataProc
field.
RESULT CODES
noErr
|
0
|
No error
|
paramErr
|
-50
|
Invalid parameter specified
|
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents